package com.manage.platform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.manage.platform.dto.MenuDto;
import com.manage.platform.dto.query.MenuPageQuery;
import com.manage.platform.entity.MenuEntity;
import com.manage.platform.entity.RoleMenuEntity;
import com.manage.platform.vo.CommonVo;
import com.manage.platform.vo.MenuTreeVo;
import com.manage.platform.vo.MenuVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * YWD
 * 2025/9/24
 */
@Mapper
public interface MenuMapper extends BaseMapper<MenuEntity> {


    List<MenuTreeVo> getMenuTree();

    List<MenuVo> getMenuPage(@Param("query") MenuPageQuery query);

    List<CommonVo> getMenuList(@Param("name") String name);

    Boolean saveMenu(@Param("dto") MenuDto dto);

    Boolean saveRoleMenu(@Param("roleId") Long roleId, @Param("menuId") long menuId);


}
